package chixing.day11.homework.work8;

public class PaymentService {

    public static void main(String[] args) {
        WeChatPay weChatPay = new WeChatPay();
        doPayment(weChatPay,900);

        BankPay bankPay = new BankPay();
        doPayment(bankPay,899);

        AliPay aliPay = new AliPay();
        doPayment(aliPay,66666);
    }
    //doPayment(IPayment paymentMethod, double amount)
    public static void doPayment(IPayment paymentMethod, double amount){
        paymentMethod.pay(amount);
    }
}

